package targetSource;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.Comparator;
interface pr   
{   
void print1();   
}   
public class souce1 {
	private static int instrumentID = -1; 
	public static void main(String[] args){
		souce1 test = new souce1();   
		test.A();
		test.D();
	}    
	public pr dest()   
	{   
	    return new pr(){   
	     public void print1()   
	     {   
	      System.out.println("Hello world!!");   
	     }   
	    };   
	}   
	public int A(){    
		int result = 0;  
		try {       
			B(); 
		} catch (IOException e) { 
			// TODO Auto-generated catch block
			System.out.println("succeed create IOException . instrumentID = " +instrumentID);
		}  
		//System.out.println("fail create IOException");
		return result;
	}     
	public int B() throws IOException{ 
		int result = 0;   
		C(-2);
		return result;
	} 
	public void C(int i) throws IOException{
	      if(i != 1)
	            throw new java.io.IOException();
	      else if (i > 1) 
	            return;
	      else{
	            i += 1;
	            int m= 0, n =0;
	            m = m + i;
	      }
	      i += i; 
	      if ( i > 3) 
	            i -=1;
	      else 
	            i -=2;
	      switch(i){
	      case 1:i +=1;break;
	      case 2:i +=1;break;
	      case 3:i +=1;break;
	      } 
	      Comparator c = new Comparator() {
	            @Override
                  public int compare(Object o1, Object o2) {
                        // TODO Auto-generated method stub
                        return 0;
                  }};
	}
	public static void D(){
	           i: { 
	                  int i = 0;
	                  assert(i==0);
	                  int j = 1;
	                 
	                  do{
	                        i = i + 1;
	                         if(i > 0)
	                               break i;
	                         else{
	                               i +=1;
	                               i--;
	                               i --;
	                               print("A");
	                               souce1 A = new souce1();
	                               continue;
	                         }
	                  }while(i < 10);
	            }
	}
	public static void print(String content){
		String fileName="methodsUsed.txt";
		File f=new File(fileName);
		try {
			RandomAccessFile raf=new RandomAccessFile(f,"rw");
			raf.seek(raf.length());
			raf.writeChars(content);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
        
	}
	
}
